<?php
require_once('includeDb.php');


function selectChapter($table, $book, $chapter)
{

    $bibleDAO = DAOFactory::getBibleDAO($table);
    $chapterContent = $bibleDAO->queryByChapter($book, $chapter);

    $y = "book".$book." chapter ".$chapter. "<br>";
    for ($i = 0; $i < count($chapterContent); $i++) {
        $y .= displayBible($chapterContent[$i]);
    }
    return $y;
}

function displayBible(Bible $bible)
{

    $y = $bible->noStart . "-" . $bible->noEnd . " " . $bible->article . "<br>";
    $y .= '<div id="dialog" title="Dialog Title">Im in a dialog</div>';

    $y .= '<button id="selector">Open Dialog</button>';
  //  $y .= '<div id="selector"><img src="http://www.geezexperience.com/tigrignabible/images/warning.gif" width="13" title="click here if the verse has error"\></div>';
    return $y;

}